﻿using Microsoft.AspNetCore.Http;

namespace Crossroad.Core.Extensions
{
    public static class HttpExt
    {
        /// <summary>
        /// 该请求是否是 options 请求方式
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        public static bool IsOptions(this HttpContext context)
        {
            var method = context.Request.Method.ToUpper();
            return method.Equals("OPTIONS");
        }


    }
}
